package com.lzs.DAO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.lzs.PO.Menu;
import com.lzs.PO.User;

public interface MenuDAO {
//查询所有权限
	public List<Menu> selectMenus();

	// 查找子节点
	public List<Menu> queryChildMenus(@Param(value = "pid") String pid);

	public List<String> findMenuIdsByRoleId(@Param(value = "roleid") Integer roleid);

	public List<Menu> findMenuList(@Param(value = "keyword") String keyword);

	public List<Menu> findMenuPageList(@Param(value = "keyword") String keyword, @Param("pageSize") Integer pageSize,
			@Param("startIndex")Integer startIndex);

	public long countMenuById(@Param("menuid")String menuid);

	public void addMenu(Map<String, Object> map);

	public Menu selectMenuById(@Param("menuid")String menuid);

	public void deleteMenu(@Param("menuid")String menuid);

	public void updateMenu(Map<String, Object> map);

	public List<Menu> queryMenus4User(User user);

	public List<Menu> queryChildMenus4User(String menuid, @Param("user")User user);

	public List<Menu> findRoot(@Param("pid")String pid);

	
}
